1. Field of the Invention
The present invention relates generally to an automatic focusing apparatus and, more particularly, to an improvement of an automatic focusing apparatus for automatically matching the focus relative to an object in response to a video signal obtained from an image sensor, in an image sensing apparatus such as a video camera having an automatic focusing mechanism.
2. Description of the Background Art
In an automatic focusing apparatus used in an image sensing apparatus such as a video camera, an approach utilizing a video signal itself obtained from an image sensor for evaluating a focus-controlled state has conventionally been developed. In such an approach, substantially no parallax exists. In addition, the approach has a number of good characteristics in which even if the depth of field is small and even if an object is located in the distance, the focus can be exactly matched. Further, in this approach, there is no need to separately provide a specific sensor for automatic focusing, and hence the apparatus is very simple in mechanism.
As one example of such a focus control method employing a video signal, a control method, a so-called hill-climbing servo system has conventionally been known. The hill-climbing servo system is described in, U.S. Pat. Nos. 4,638,364 and 4,614,975 and Japanese Patent Laying-Open Nos. 58-58505, 60-103776 and 63-215268. Briefly stated, a high frequency component of a video signal obtained from an image sensor is detected every one field as a focus evaluating value, the detected focus evaluating value is always compared with a focus evaluating value detected one field before, and the position of a focusing lens keeps changing so that the focus evaluating value always assumes its maximum value.
FIG. 1 is a schematic block diagram showing a conventional automatic focusing apparatus adopting the hill-climbing servo system; and FIG. 2 is a block diagram showing the detail of a focus evaluating value generating circuit of FIG. 1.
Referring to FIG. 1, a video camera includes a focusing ring 2 for moving a focusing lens 1 forward and backward, a focusing motor 3 which is a stepping motor for driving focusing ring 2, and an image sensing circuit 4 including an image sensor (not shown) such as a CCD (Charge Coupled Device). Focusing lens 1 may be moved by employing a piezoelectric element in place of a motor. addition, the image sensor (not shown) itself such as the CCD may be moved in place of the focusing lens.
An image formed on a surface of the image sensor by focusing lens 1 is converted into a video signal by image sensing circuit 4 and then supplied as an input to a focus evaluating value generating circuit 5.
Referring to FIG. 2 showing the detail of focus evaluating value generating circuit 5, a luminance signal component in a video signal output from image sensing circuit 4 is applied to a synchronizing separator circuit 5a and a high-pass filter 5c. A high frequency component of the video signal (luminance signal component) separated by high-pass filter 5c is amplitude-detected by a detector circuit 5d, and a detected output thereof is applied to an A/D converter circuit 5e. This A/D converter circuit 5e converts the applied detected output into a digital value, to apply the digital value to a gate circuit 5f.
Synchronizing separator circuit 5a separates a vertical synchronizing signal VD and a horizontal synchronizing signal HD from an applied luminance signal and applies the separated signals to a gate control circuit 5b. Gate control circuit 5b sets a rectangular focusing area in the center of a picture in response to the applied vertical synchronizing signal VD and horizontal synchronizing signal HD and to a fixed output of an oscillator (not shown). Then, gate control circuit 5b applies a signal for opening/closing a gate for each field to gate circuit 5f so as to allow passage of an A/D conversion value of a high frequency component only within this focusing area. This gate circuit 5f may be provided anywhere at a preceding stage of an integrating circuit 5g which will be described later.
Only the A/D conversion value of the high frequency component corresponding to the focusing area is applied to integrating circuit 5g for each field by this gate circuit 5f. Integrating circuit 5g integrates the applied A/D conversion value for each field, to supply the integrated value as a focus evaluating value of the present field.
FIG. 3 is a graph illustrating the relationship between a focusing lens position and a focus evaluating value in an automatic focusing operation of the hill-climbing servo system by the automatic focusing apparatus shown in FIG. 1.
A description will now be given of an automatic focusing operation immediately after an automatic focusing control starts, with reference to FIGS. 1-3. Immediately after the start of the automatic focusing operation, a focus evaluating value corresponding to the first one field output from focus evaluating value generating circuit 5 is first applied to a maximum value memory 6 and an initial value memory 7 and then held therein. Thereafter, a focusing motor control circuit 10 rotates focusing motor 3 which is a stepping motor in a predetermined direction, to displace lens 1 along the direction of an optical axis. A comparator 9 then makes a comparison between an initial focus evaluating value held in initial value memory 7 and the present focus evaluating value output from focus evaluating value generating circuit 5, to generate a comparison signal. Focusing motor control circuit 10 responds to the generated comparison signal to initialize a direction in which focusing motor 3 rotates.
That is, focusing motor control circuit 10 keeps rotating focusing motor 3 in the above-described predetermined direction until comparator 9 generates a comparison output indicating "large" or "small". If comparator 9 outputs a comparison output indicating that the present focus evaluating value is higher than the initial focus evaluating value held in initial value memory 7, then focusing motor control circuit 10 maintains the above-described predetermined rotating direction. Conversely, if a comparison output indicating that the present focus evaluating value is lower than the initial focus evaluating value is obtained, then focusing motor control circuit 10 reverses the rotating direction of focusing motor 3.
Thus, the initialization of the rotating direction of focusing motor 3 is completed. Focusing motor control circuit 10 thereafter monitors an output of a comparator 8. In order to prevent a malfunction due to noise of the focus evaluating value, comparator 9 may be adapted not to generate the comparison output indicating "large" or "small" while the difference between the initial focus evaluating value and the present focus evaluating value does not exceed a predetermined threshold value.
Comparator 8 makes a comparison between the maximum focus evaluating value held so far in maximum value memory 6 and the present focus evaluating value output from focus evaluating value generating circuit 5, to output two types of comparison signals (S.sub.1, S.sub.2): the signal (in a first mode) indicating that the present focus evaluating value is higher than the focus evaluating value held in maximum value memory 6, and the other signal (in a second mode) indicating that the present focus evaluating value is lowered by a predetermined first threshold value M or more with respect to the focus evaluating value held in the memory 6 (FIG. 3). If the present focus evaluating value takes a higher value than the contents of maximum value memory 6, then the contents of memory 6 is updated in response to the output S.sub.1 of comparator 8, so that the maximum value of the focus evaluating value so far is always held in maximum value memory 6.
A signal indicating the position of focusing ring 2 is generated from a motor position detecting circuit 30 in response to the position of focusing ring 2 supporting focusing lens 1 and then applied to a focusing ring position memory 13. More specifically, motor position detecting circuit 30 is constituted by an up-down counter which is reset at the time point when the automatic focusing operation starts. This up-down counter counts up the amount of steps of focusing motor 3, which is the stepping motor, in the direction of a near point as a positive variation, while it counts down the step amount in the direction of a far point as a negative variation. The up-down counter then supplies count values thereof as the focus ring position signal to focusing ring position memory 13. This focusing ring position memory 13 is updated in response to the output S.sub.1 of comparator 8 so as to always hold a focusing ring position signal generated when the focus evaluating value is maximum.
Focusing motor control circuit 10 monitors the output of comparator 8 while rotating focusing motor 3 in a direction initialized in response to the output of comparator 9 as described above. When the comparison output S.sub.2 in the second mode, in which the present focus evaluating value is lowered by the above-described first threshold value M or more as compared with the maximum focus evaluating value, is obtained from comparator 8, focusing motor control circuit 10 reverses the rotating direction of focusing motor 3 (FIG. 3). This reverse rotation causes the moving direction of lens 1 to change from the direction in which lens 1 approaches the image sensor to the direction in which the lens departs from the image sensor, or conversely, from the direction in which the lens departs from the image sensor to the direction in which the lens approaches the image sensor. In order to prevent a malfunction due to noise of the focus evaluating value, the rotating direction of focusing motor 3 is not reversed until the present focus evaluating value is lowered by the predetermined first threshold value M or more.
After the reversal of the rotating direction of focusing motor 3, a comparator 14 makes a comparison between the contents of focusing ring position memory 13 corresponding to the maximum value of the focus evaluating value and the present focusing ring position signal generated from motor position detecting circuit 30. When both match, i.e., the focusing ring 2 returns to a position at which the focus evaluating value assumes its maximum value, focusing motor control circuit 10 stops the rotation of focusing motor 3 (FIG. 3). At the same time, focusing motor control circuit 10 outputs a lens stop signal LS. A series of automatic focusing operations are thus completed.
A memory 11 and a comparator 12 serve as circuits for restarting the automatic focusing operation performed by focusing motor control circuit 10 in case where the focus evaluating value changes by a predetermined second threshold value or more when the focusing lens stops. That is, the focus evaluating value, which is obtained at the time when focusing motor control circuit 10 completes the automatic focusing operation, to generate lens stop signal LS, is held in memory 11. Then, comparator 12 makes a comparison between the contents of memory 11 and the present focus evaluating value output from focus evaluating value generating circuit 5. If the difference between the contents of memory 11 and the present focus evaluating value is larger than the predetermined second threshold value, then an object variation signal is applied to focusing motor control circuit 10 with a determination that some changes occur in the object. As a result, focusing motor control circuit 10 restarts the automatic focusing operation, so that an automatic focusing operation following the change of the object is attained.
The conventional automatic focusing apparatus of the above-described hill-climbing servo system can achieve a highly precise in-focus operation and is also highly adaptable to various types of objects; however, the apparatus has the following disadvantages.
More specifically, a disadvantage concerns with an approach of setting a focusing area, i.e., a region in which a high frequency component of a luminance signal is integrated to be calculated as a focus evaluating value. If the focusing area is set to be large, for example, a desired object cannot be brought into focus due to an influence caused such as by the background being included in the set focusing area. Conversely, if the focusing area is set to be small, an object having a sufficient contrast, results in an unstable automatic focusing operation due to a high frequency component being out of the focusing area.
A method of eliminating the disadvantage with respect to the selection of the focusing area is disclosed in Japanese Patent Laying-Open No. 01-284181. More specifically, a method is proposed in which two areas, a large area and small area are previously set in a picture, and either one of those two areas is selected as a focusing area dependent on the state of the automatic focusing operation, for example, based on a variation ratio of a focus evaluating value of each area, or alternatively, based on an absolute value of a focus evaluating value per unit area size of each area.
If many factors such as the variation ratio, the absolute value, etc. of the focus evaluating values are employed at the same time, then a highly precise and stable automatic focusing operation can be achieved under various picture taking conditions and with respect to various kinds of objects. As the number of factors to be employed for such an automatic focusing operation increases, however, the scale of the automatic focusing apparatus inevitably increases. In addition, with respect to only one factor to be employed, it is necessary to prepare individual results for various values which can be taken by this factor, entailing a further increase in the scale of the automatic focusing apparatus.
In case where there is some factor of variation in the focus evaluating value, for example, the object changes upon determination of the moving direction of the lens when the automatic focusing operation starts, it is difficult to accurately determine the moving direction based only on an increase or decrease of the focus evaluating value as described above.
Thus, in order to eliminate such a disadvantage regarding the determination of the direction, the inventor of the present application has proposed a technique of determining the moving direction of the lens based on a change of a relative ratio caused by a slight movement of the lens upon the start of the automatic focusing operation, in view of the fact that the relative ratio of two types of focus evaluating values obtained from two high-pass filters having different cut-off frequencies becomes a chevron-shaped function having its summit at an in-focus position. This proposed technique is, however, not yet made public. Even in such a method, however, an increase in the scale of the automatic focusing apparatus inevitably occurs in order to perform a highly precise determination of the direction under various picture taking circumstances and with respect to various objects, for the same reason as in the case of the above-described area selection.
The foregoing Japanese Patent Lying-Open No. 01-284181 also discloses a technique in which regarding the selection of a focusing area, if the focus evaluating value of the smaller area of two areas is higher than or equal to a predetermined value, then that area is selected as a focusing area; and conversely, if that focus evaluating value of the smaller area is lower than the predetermined value, then the larger area is selected as a focusing area with a determination that an object to be brought into focus no longer exists in the smaller area.
If the selection of the focusing area is made simply based on the degree of the focus evaluating values as described above, however, it becomes difficult to distinguish between the state where the object to be brought into focus does not exist in the focusing area and the state where the object exists in the focusing area, but is greatly defocused, and hence the focus evaluating value is lower. Thus, there occurs a disadvantage that not a desired object in the center of a picture but the peripheries of the picture is brought into focus.
Moreover, the conventional automatic focusing apparatus shown in FIG. 1 has another disadvantage in that an accurate automatic focusing operation cannot be performed when an object in which a high frequency component is not easily produced in a luminance signal even in an in-focus state, e.g. walls having no design thereon are image-sensed
In more detail, the focus evaluating value does not decrease in excess of the first threshold value M (FIG. 3) below the maximum value of the focus evaluating value during an automatic focusing operation with respect to the above-described object. Accordingly, a determination is never made that the position of the lens in which the focus evaluating value takes the maximum value is an in-focus position. Thus, the lens keeps being displaced in the whole course between an infinite far point and a near point, so that the focusing motor can not stop therebetween.
In the conventional automatic focusing apparatus, in the above case, i.e., the case where the lens makes a single scanning in the whole course between the infinite far point and the near point, the lens is unconditionally returned to the position where the focus evaluating value takes the maximum value, or alternatively to the initial position where the automatic focusing operation starts, so as to stop the focusing motor. More specifically, in such a conventional automatic focusing apparatus, the stop of the focusing motor is valued higher than the reliability of the automatic focusing operation itself, and hence, the probability that a final stop position of the lens is an in-focus position is considerably lower than the probability obtained when an object having a sufficiently large high frequency component is image-sensed.
As described in the foregoing, in case where the automatic focusing operation is completed with the object being greatly defocused, even if an object having a sufficiently high contrast is thereafter entered in the focusing area, no change occurs in the high frequency component of a luminance signal due to the excessively high degree of defocus. Accordingly, the focus evaluating value does not make such a change as to exceed the abovedescribed second threshold value. Consequently, there is a disadvantage that comparator 12 of FIG. 1 can not detect such a change of the object, so that a focusing operation with respect to a new object is not restarted.